Skip to content

Revert "Add ExecutionPlan::apply_expressions() (#20337)"#22437

Merged
alamb merged 3 commits into
apache:mainfrom
alamb:alamb/revert_apply_expressions
May 21, 2026
Merged

Revert "Add ExecutionPlan::apply_expressions() (#20337)"#22437
alamb merged 3 commits into
apache:mainfrom
alamb:alamb/revert_apply_expressions

Conversation

@alamb
Copy link
Copy Markdown
Contributor

@alamb alamb commented May 21, 2026

Which issue does this PR close?

Rationale for this change

ExecutionPlan::apply_expressions() was added in #20337 with no default implementation, forcing every custom ExecutionPlan, FileSource, and DataSource implementor to add the method as part of upgrading to DataFusion 54.

As discussed on #22415, per @LiaCastaneda and @adriangb the method is not yet called from anywhere in DataFusion and the originally intended use (dynamic-filter discovery/serialization for distributed scenarios) is blocked on other in-progress work (#20009, #21350).

The combined effect on downstream users is a required code change with no immediate benefit, and ambiguity about what a "correct" implementation even means today (e.g. is returning Ok(TreeNodeRecursion::Continue) is safe right now but becomes incorrect as soon as the method starts being used by an optimizer pass?.

The plan agreed in the discussion is to remove the API from the 54.0 release and re-add it together with the concrete consumer that needs it. cc @adriangb @LiaCastaneda @milenkovicm.

What changes are included in this PR?

git revert -m 1 of the merge commit, with the following manual conflict resolutions and follow-ups:

Are these changes tested?

By CI

Are there any user-facing changes?

Yes -- this removes the new public API:

  • ExecutionPlan::apply_expressions
  • FileSource::apply_expressions
  • DataSource::apply_expressions

These were only added in 54 and are not yet released. Custom implementors no longer need to implement these methods.

This reverts commit a5f490e.

# Conflicts:
#	datafusion/core/tests/physical_optimizer/filter_pushdown.rs
#	datafusion/datasource-json/src/source.rs
#	datafusion/datasource/src/file_scan_config/mod.rs
#	datafusion/datasource/src/source.rs
#	datafusion/ffi/src/execution_plan.rs
#	datafusion/physical-optimizer/src/ensure_coop.rs
#	datafusion/physical-plan/src/execution_plan.rs
#	datafusion/physical-plan/src/union.rs
#	docs/source/library-user-guide/custom-table-providers.md
#	docs/source/library-user-guide/upgrading/54.0.0.md
@github-actions github-actions Bot added documentation Improvements or additions to documentation optimizer Optimizer rules core Core DataFusion crate catalog Related to the catalog crate proto Related to proto crate datasource Changes to the datasource crate ffi Changes to the ffi crate physical-plan Changes to the physical-plan crate labels May 21, 2026
Copy link
Copy Markdown
Contributor

@adriangb adriangb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alamb

@alamb alamb marked this pull request as ready for review May 21, 2026 17:48
@alamb
Copy link
Copy Markdown
Contributor Author

alamb commented May 21, 2026

Once we merge this I will backport it to branch-54 as well

@alamb alamb enabled auto-merge May 21, 2026 19:37
@alamb alamb added this pull request to the merge queue May 21, 2026
Merged via the queue into apache:main with commit 2a19282 May 21, 2026
39 checks passed
@alamb alamb deleted the alamb/revert_apply_expressions branch May 21, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catalog Related to the catalog crate core Core DataFusion crate datasource Changes to the datasource crate documentation Improvements or additions to documentation ffi Changes to the ffi crate optimizer Optimizer rules physical-plan Changes to the physical-plan crate proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants